package com.sunrate.investingquote.dto.router.comparator;

import lombok.Data;
import org.jetbrains.annotations.NotNull;

import java.math.BigDecimal;

/**
 * @author yyh
 * @description:
 * @date 2023/06/29/ 15:57
 */
@Data
public class RouterSortContext<T> {

    private T data;

    private Integer defaultPriority;
    private BigDecimal feeRate;
    private Integer costTime;
    private Other other;

    static class Other implements Comparable<Other> {
        private String value;

        @Override
        public int compareTo(@NotNull Other o) {
            return Integer.compare(this.value.length(), o.value.length());
        }
    }
}
